package test;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

class solution
{

	public static void main(String[] args)
	{
		method("t3h6j2j7n8b2v1a4l7");
	}

	static void method(String operStr)
	{
		if (operStr.isEmpty())
		{
			return;
		}
		char[] chars = operStr.toCharArray();
		Map<Character, Set> retMap = new HashMap<Character, Set>();
		for (int i = 0; i < chars.length; i++)
		{
			if ((chars[i] <= 90 && chars[i] >= 65) || (chars[i] <= 122 && chars[i] >= 97))
			{
				if (retMap.containsKey(chars[i]))
				{
					retMap.get(chars[i]).add(chars[i] + "" + chars[i + 1]);
				}
				else
				{
					Set eleList = new HashSet();
					eleList.add(chars[i] + "" + chars[i + 1]);
					retMap.put(chars[i], eleList);
				}
				i++;
			}
		}
		for (Map.Entry<Character, Set> element : retMap.entrySet()
			)
		{
			System.out.println(element.getKey() + ":" + element.getValue().toString());
		}

	}

}


